class User:
    def __init__(self, username, password):
        self.username = username
        self.password = password

    def login(self, username, password):
        if username == self.username and password == self.password:
            print("登录成功")
        else:
            print("用户名或密码错误，请重新输入")

    def show(self):
        print("用户名:{},密码:{}".format(self.username, self.password))
    def publish_article(self,article):
        event = self.username + '发表了文章:' + article.name
        print(event)